//
//  AboutScene.m
//  Bridge
//
//  Created by vinh pham on 5/11/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "AboutScene.h"
#import "MainScene.h"

@implementation AboutLayer

- (id) init {
    self = [super init];
    if (self != nil) {
        isTouchEnabled_ = TRUE;
    }
    return self;
}

- (void) ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    //UITouch *touch = [touches anyObject];
    //startPoint = [touch locationInView:[touch view]];
    [[CCDirector sharedDirector] replaceScene:[CCTransitionFadeTR transitionWithDuration:1 scene:[MainScene node]]];
}

@end

@implementation AboutScene

- (id) init {
    self = [super init];
    if (self != nil) {
        CGSize winSize = [CCDirector sharedDirector].winSize;
        
        CCSprite *bg = [CCSprite spriteWithFile:[CCFileUtils fullPathFromRelativePath:@"bg_about.png"]];
        [bg setPosition:ccp(winSize.width/2, winSize.height/2)];
        [self addChild:bg];
        
        CCLabelBMFont *label = [CCLabelBMFont labelWithString:@"About Scene" fntFile:@"Arial.fnt"];
        //label.scale = 0.1;
        label.position = ccp(winSize.width/2, winSize.height/2);
        [self addChild:label];
        
        [self addChild:[AboutLayer node]];
        
    }
    return self;
}

- (void) dealloc {
    [super dealloc];
}

@end
